/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *Repository提供数据库操作，如果要增加数据库操作请在当前目录下Partial文件夹IInventoryCountItemRepository编写接口
 */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VOL.Core.BaseProvider;
using VOL.Entity.DomainModels;
using VOL.Core.Extensions.AutofacManager;

namespace VOL.demo.IRepositories
{
    public partial interface IInventoryCountItemRepository : IDependency,IRepository<InventoryCountItem>
    {
        /// <summary>
        /// 根据盘点单号获取明细列表
        /// </summary>
        /// <param name="countCode">盘点单号</param>
        /// <returns>明细列表</returns>
        Task<List<InventoryCountItem>> GetItemsByCountCodeAsync(string countCode);

        /// <summary>
        /// 批量添加盘点明细
        /// </summary>
        /// <param name="items">明细列表</param>
        /// <returns>是否成功</returns>
        Task<bool> AddItemsAsync(List<InventoryCountItem> items);

        /// <summary>
        /// 根据盘点单号删除明细（逻辑删除或物理删除，视实现）
        /// </summary>
        /// <param name="countCode">盘点单号</param>
        /// <returns>是否成功</returns>
        Task<bool> DeleteItemsByCountCodeAsync(string countCode);

        /// <summary>
        /// 更新明细项
        /// </summary>
        /// <param name="item">明细项</param>
        /// <returns>是否成功</returns>
        Task<bool> UpdateItemAsync(InventoryCountItem item);
    }
}
